import request from '@/utils/request'

//    drug  药品信息维护
export function DzmHisMember_list(data) {
	return request({
		url: `http://localhost:8080/DzmHisMember_list`,
		method: 'get',
		params: data

	})
}


//弹出框页面值
export function DzmHisMember_listQuery(data) {
	return request({
		url: `http://localhost:8080/DzmHisMember_listQuery`,
		method: 'get',
		params: data
	})
}

export function DzmHisMember_insert(id) {
	return request({
		url: `http://localhost:8080/DzmHisMember_insert?medicinesId=${id}`,
		method: 'get'
	})
}

export function DzmHisMember_delete(id) {
	return request({
		url: `http://localhost:8080/DzmHisMember_delete?medicinesId=${id}`,
		method: 'post'
	})
}

//======== supplier 供应商维护

//查询列表
export function DzmHisSupplier_list() {
	return request({
		url: `http://localhost:8080/DzmHisSupplier_list`,
		method: 'get'
	})

}

//删除
export function DzmHisSupplier_delete(id) {
	return request({
		url: `http://localhost:8080/DzmHisSupplier_delete?sid=${id}`,
		method: 'get'
	})
}

//添加
export function DzmHisSupplier_insert(data) {
	return request({
		url: `http://localhost:8080/DzmHisSupplier_insert`,
		method: 'post',
		params: data
	})
}

//修改
export function DzmHisSupplier_update(data) {
	return request({
		url: `http://localhost:8080/DzmHisSupplier_update`,
		method: 'post',
		params: data
	})
}

//回显 id查
export function DzmHisSupplier_getByid(id) {
	return request({
		url: `http://localhost:8080/DzmHisSupplier_getByid?sid=${id}`,
		method: 'get',
	})
}

// =================purchase 采购信息表

export function DzmHisPurchase_list(data) {
	return request({
		url: `http://localhost:8080/DzmHisPurchase_list`,
		method: 'get',
		params: data
	})
}

export function DzmHisPurchase_batch_query() {
	return request({
		url: `http://localhost:8080/DzmHisPurchase_batch_query`,
		method: 'get',
	})
}


export function DzmHisPurchase_insert(data) {
	console.log(">>>>>>>>" + data.batchesOfInventoryId)
	return request({
		url: `http://localhost:8080/DzmHisPurchase_insert`,
		method: 'post',
		params: data
	})
}


export function DzmHisPurchase_update(data) {
	return request({
		url: `http://localhost:8080/DzmHisPurchase_update`,
		method: 'post',
		params: data
	})
}

export function DzmHisPurchase_update_getid(id) {
	return request({
		url: `http://localhost:8080/DzmHisPurchase_update_getid?purchaseId=${id}`,
		method: 'get',
	})
}

export function DzmHisPurchase_delete(id) {
	return request({
		url: `http://localhost:8080/DzmHisPurchase_delete?purchaseId=${id}`,
		method: 'get'
	})
}


// ============================审核


export function DzmHisBatchesOfInventory_insert(data) {
	return request({
		url: `http://localhost:8080/DzmHisBatchesOfInventory_insert`,
		method: 'get',
		params: data
	})
}


export function dzmHisPurchase_review_the_drugs(data) {
	return request({
		url: `http://localhost:8080/dzmHisPurchase_review_the_drugs`,
		method: 'get',
		params: data
	})
}

export function dzmHisPurchase_update_state(id) {
	return request({
		url: `http://localhost:8080/dzmHisPurchase_update_state?batchesOfInventoryId=${id}`,
		method: 'get',
	})
}



//=============================
export function dzmHisInventory_select() {
	return request({
		url: `http://localhost:8080/dzmHisInventory_select`,
		method: 'get',
	})
}

export function dzmHisInventory_update(data) {
	return request({
		url: `http://localhost:8080/dzmHisInventory_update`,
		method: 'get',
		params: data
	})
}


export function dzmHisBatchesOfInventory_update_statu(id) {
	return request({
		url: `http://localhost:8080/dzmHisBatchesOfInventory_update_statu?batchesOfInventoryId=${id}`,
		method: 'get',
	})
}

export function dzmHisBatchesOfInventory_update_statu_btg(id) {
	return request({
		url: `http://localhost:8080/dzmHisBatchesOfInventory_update_statu_btg?batchesOfInventoryId=${id}`,
		method: 'get',
	})
}









